/******************************************************************************
 *                                                                            *
 *               (c) 2008-2009 HutLab. All rights reserved.                   *
 *                        Eduardo Henrique Leite                              *
 *                                                                            *
 ******************************************************************************

 History:
 Created 02/01/2009

 */

package hutlab.sudoku.engine;

import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
import hutlab.sudoku.*;

/**
 * Sudoku Game class.
 */
public class SudokuGame {

    // ----- FIELDS -----

    private SudokuGameCanvas mCanvas;
    private Display mDisplay;

    // ----- GETTERS -----

    /**
     * Returns the canvas object.
     */
    public SudokuGameCanvas getCanvas(){
        return mCanvas;
    }

    /**
     * Returns the display object.
     */
    public Display getDisplay(){
        return mDisplay;
    }

    // ----- SETTERS -----

    /**
     * Sets the display object.
     */
    public void setDisplay(Display display){
        mDisplay = display;
    }

    // ----- CONSTRUCTOR -----

    /**
     * Creates a new SudokuEngine object.
     */
    public SudokuGame(SudokuGameRun midlet){
        this.mDisplay = Display.getDisplay((MIDlet) midlet);
        this.mCanvas = new SudokuGameCanvas(midlet);
        this.mCanvas.setDisplay(this.mDisplay);
    }
}

